import request from '@/utils/request'

export default {
  getMaterialData() {
    return request.get('/wuliao-info/list')
  },

  addMaterialData(data) {
    return request.post('/wuliao-info/add', data)
  },

  editmaterialData(data) {
    return request.post('/wuliao-info/update', data)
  },

  // 通过物资关键词查询位置
  searchByKeyword(data) {
    return request({
      url: '/api/material-location/search-by-keyword',
      method: 'POST',
      data
    })
  },

  // 通过类型+类目ID查询位置
  searchByTypeAndCategory(data) {
    return request({
      url: '/api/material-location/search-by-type-id',
      method: 'POST',
      data
    })
  }
}
